package com.tools.hry.xls.create;

import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Created by 峥桂 on 2017/9/5.
 */
public class DataSet {

    private String styleFileName;
    private String titleName="titleName";
    private String actionName="actionName";
    private String createTime;
    private String selfTemplatePath;
    private boolean isNeedTitle;
    private boolean isNeedStyle;

    private String[] headers;
    private List<String[]> dataList;

    public DataSet() {
    }

    public DataSet(String[] header,List<String[]> dataList) {
        this.headers = header;
        this.dataList = dataList;
    }

    public String[] getHeaders() {
        return headers;
    }

    public void setHeaders(String[] headers) {
        this.headers = headers;
    }

    public List<String[]> getDataList() {
        return dataList;
    }

    public void setDataList(List<String[]> dataList) {
        this.dataList = dataList;
    }

    public String getTitleName() {
        return titleName;
    }

    public void setTitleName(String titleName) {
        this.titleName = titleName;
    }

    public String getCreateTime() {
        if(StringUtils.isBlank(createTime)){
            createTime=new Date().toLocaleString();
        }
        return createTime;
    }

    public String getSelfTemplatePath() {
        return selfTemplatePath;
    }

    public void setSelfTemplatePath(String selfTemplatePath) {
        this.selfTemplatePath = selfTemplatePath;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getActionName() {
        return actionName;
    }

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }

    public String getStyleFileName() {
        return styleFileName;
    }

    public void setStyleFileName(String styleFileName) {
        this.styleFileName = styleFileName;
    }

    public boolean isNeedTitle() {
        return isNeedTitle;
    }

    public void setNeedTitle(boolean needTitle) {
        isNeedTitle = needTitle;
    }

    public boolean isNeedStyle() {
        return isNeedStyle;
    }

    public void setNeedStyle(boolean needStyle) {
        isNeedStyle = needStyle;
    }
}